#include <cstring>
#include <iostream>

#include <boost/foreach.hpp>
#include <boost/smart_ptr.hpp>

using namespace std;

int main()
{
   boost::scoped_array<int> p(new int[10]);

   memset(p.get(), 0, 10*sizeof(int));

   for (int i=0; i< 8; i++)
      p[i] = i*3;

   for (int i=0; i< 10; i++)
      cout << p[i]  << endl;

   p.reset();
   for (int i=0; i< 10; i++)
      cout << p[i]  << endl;
   
}
      
   

